#ifndef CALLTIP_H
#define CALLTIP_H

#ifdef SCI_NAMESPACE
namespace Scintilla {
#endif


#include <string>



  class CallTip {
      int startHighlight;
      int endHighlight;
      std::string val;
      Font font;
      PRectangle rectUp;
      PRectangle rectDown;
      int lineHeight;
      int offsetMain;
      int tabSize;
      bool useStyleCallTip;
      bool above;

      CallTip( const CallTip & );
      CallTip &operator=( const CallTip & );
      void DrawChunk( Surface *surface, int &x, const char *s,
                      int posStart, int posEnd, int ytext, PRectangle rcClient,
                      bool highlight, bool draw );
      int PaintContents( Surface *surfaceWindow, bool draw );
      bool IsTabCharacter( char c ) const;
      int NextTabPos( int x ) const;

    public:
      Window wCallTip;
      Window wDraw;
      bool inCallTipMode;
      int posStartCallTip;
      ColourDesired colourBG;
      ColourDesired colourUnSel;
      ColourDesired colourSel;
      ColourDesired colourShade;
      ColourDesired colourLight;
      int codePage;
      int clickPlace;

      int insetX;
      int widthArrow;
      int borderHeight;
      int verticalOffset;
      CallTip();
      ~CallTip();

      void PaintCT( Surface *surfaceWindow );

      void MouseClick( Point pt );


      PRectangle CallTipStart( int pos, Point pt, int textHeight, const char *defn,
                               const char *faceName, int size, int codePage_,
                               int characterSet, int technology, Window &wParent );

      void CallTipCancel();



      void SetHighlight( int start, int end );


      void SetTabSize( int tabSz );


      void SetPosition( bool aboveText );


      bool UseStyleCallTip() const { return useStyleCallTip;}


      void SetForeBack( const ColourDesired &fore, const ColourDesired &back );
  };

  #ifdef SCI_NAMESPACE
}
  #endif

#endif
